﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace AdminSytem.Repositories
{
    public interface IRepository<T>where T : class
    {
         Task<int> InsertAsync(T entity);
        Task<int> DeleteManyAsync(List<T> entites);
        Task<T> QueryFirstAsync(Expression<Func<T, bool>> predicate);
        Task<List<T>> QueryAsync(Expression<Func<T, bool>> predicate);
        Task<bool> ExitstAsync(Expression<Func<T, bool>> predicate);
        Task<int> UpdateAsync(T entity);
        Task<List<T>> QueryAsync();
        IQueryable<T> GetAll();
    }
}
